package com.tanhua.sso.enums;

import com.baomidou.mybatisplus.core.enums.IEnum;

//表示性别的枚举类
public enum SexEnum implements IEnum<Integer> {

    //这里必须写属性
    MAN(1,"男"),
    WOMAN(2,"女"),
    UNKNOWN(3,"未知");

    private int value;
    private String desc;

    //枚举的构造方法
    SexEnum(int value, String desc) {
        this.value = value;
        this.desc=desc;
    }

    //必须重写的方法
    @Override
    public Integer getValue() {
        return this.value;
    }

    @Override
    public String toString() {
        return "SexEnum{" +
                "value=" + value +
                ", desc='" + desc + '\'' +
                '}';
    }
}
